package com.atguigu.utils;
//
public class MysqlUtil {
    public static String getBaseDicDDL(){
        return "CREATE TABLE base_dic(\n" +
                "  dic_code string,\n" +
                "  dic_name string,\n" +
                "  parent_code string,\n" +
                "  create_time STRING,\n" +
                "  operate_time STRING\n" +
                ") "+getMysqlConn("base_dic");
    }

    public static String getMysqlConn(String tableName){
        return "WITH (\n" +
                "  'connector' = 'jdbc',\n" +
                        "  'url' = 'jdbc:mysql://hadoop102:3306/gmall',\n" +
                        "  'driver'='com.mysql.cj.jdbc.Driver',"+
                        "  'table-name' = '"+tableName+"',\n" +
                        "'username'='root',"+
                        " 'password'='123456'"+
                        ")";
    }

}
